/****************************************************************************/    
/* NAME:           oscillator.h                                             */    
/* PURPOSE:        Manage all oscillator                                    */    
/* CREATED_BY:     Vyx                                                      */    
/* CREATION_DATE:  07/07/2012                                               */ 
/************************************** (C) Copyright 2012 AquaLink *********/

#include "main.h"

typedef enum
{
    OSCI_NORMAL_MODE,
    OSCI_TEST_MODE
}OSCI_MODE;

typedef struct
{
    uint8_t   id;            /* oscillator ID                           */
    uint8_t   osci_x_min;    /* position min                            */
    uint8_t   osci_x_max;    /* Position max                            */
    uint32_t  osci_x_speed;  /* Oscillator speed                        */
    bool      osci_x_linear; /* Linaer mode : TRUE, random mode : FALSE */
    uint32_t  osci_x_pause;  /* Time wait between two position          */
    OSCI_MODE osci_x_mode;
}Oscillator_def_t;

/**    
  * @brief  Main function of oscillator.   
  * @param  none    
  * @retval None    
  */
void vTaskCTRL_OSCILLATOR();

/**    
  * @brief  Manage oscillator 1.   
  * @param  none    
  * @retval None    
  */ 
void vTask_OSCILLATOR_1();

/**    
  * @brief  Manage oscillator 2.   
  * @param  none    
  * @retval None    
  */ 
void vTask_OSCILLATOR_2();

/**        
  * @brief  Initialisation of modules.    
  * @param  none    
  * @retval None    
  */  
void Oscillator_init();
